#!/bin/csh

# include the make.h of this module
include make.h

# Project/Module Object Files(s)
PROJ_OBJ_LIST	 = ${PROJ_OBJ_DIR}/cmerrdismain.${ObjSuffix}
PROJ_OBJ_LIST 	+= ${PROJ_OBJ_DIR}/cmerrdislw.${ObjSuffix}
PROJ_OBJ_LIST 	+= ${PROJ_OBJ_DIR}/cmerrdiswr.${ObjSuffix}
PROJ_OBJ_LIST 	+= ${PROJ_OBJ_DIR}/cmerrdisapi.${ObjSuffix}
PROJ_OBJ_LIST 	+= ${PROJ_OBJ_DIR}/cmerrdisutil.${ObjSuffix}
PROJ_OBJ_LIST 	+= ${PROJ_OBJ_DIR}/cmerrdissz.${ObjSuffix}
PROJ_OBJ_LIST 	+= ${PROJ_OBJ_DIR}/cmerrdistrap.${ObjSuffix}
PROJ_OBJ_LIST 	+= ${PROJ_OBJ_DIR}/cmerrdismodule.${ObjSuffix}

PROJ_OBJ 	 	 = $(PROJ_OBJ_DIR)/$(PROJ_NAME).${ObjSuffix}

C_FLAGS          = ${CC_FLAGS} ${TOTAL_OPNS} ${INCS}

# make
$(PROJ_OBJ) : obj $(PROJ_OBJ_LIST)
	${LD} ${LD_FLAGS} ${CC_COMMON_OPTIONS} -o $(PROJ_OBJ)  ${PROJ_OBJ_LIST}

obj :
	$(MKDIR)  $(MKDIR_FLAGS) obj

# The rules required for the compilation of the individual Object files
${PROJ_OBJ_DIR}/cmerrdismain.${ObjSuffix}: $(PROJ_SRC_DIR)/cmerrdismain.c ${ERRDIS_DEPENDS}
	$(CC) $(C_FLAGS) -o $@ $<
	
${PROJ_OBJ_DIR}/cmerrdislw.${ObjSuffix}: $(PROJ_SRC_DIR)/cmerrdislw.c ${ERRDIS_DEPENDS}
	$(CC) $(C_FLAGS) -o $@ $<
	
${PROJ_OBJ_DIR}/cmerrdiswr.${ObjSuffix}: $(PROJ_SRC_DIR)/cmerrdiswr.c ${ERRDIS_DEPENDS}
	$(CC) $(C_FLAGS) -o $@ $<

${PROJ_OBJ_DIR}/cmerrdisapi.${ObjSuffix}: $(PROJ_SRC_DIR)/cmerrdisapi.c ${ERRDIS_DEPENDS}
	$(CC) $(C_FLAGS) -o $@ $<

${PROJ_OBJ_DIR}/cmerrdisutil.${ObjSuffix}: $(PROJ_SRC_DIR)/cmerrdisutil.c ${ERRDIS_DEPENDS}
	$(CC) $(C_FLAGS) -o $@ $<

${PROJ_OBJ_DIR}/cmerrdissz.${ObjSuffix}: $(PROJ_SRC_DIR)/cmerrdissz.c ${ERRDIS_DEPENDS}
	$(CC) $(C_FLAGS) -o $@ $<

${PROJ_OBJ_DIR}/cmerrdistrap.${ObjSuffix}: $(PROJ_SRC_DIR)/cmerrdistrap.c ${ERRDIS_DEPENDS}
	$(CC) $(C_FLAGS) -o $@ $<
	
${PROJ_OBJ_DIR}/cmerrdismodule.${ObjSuffix}: $(PROJ_SRC_DIR)/cmerrdismodule.c ${ERRDIS_DEPENDS}
	$(CC) $(C_FLAGS) -o $@ $<
	
# clean .${ObjSuffix} files
clean :
	@echo "Cleaning error disable object files"
	$(RM)  $(RM_FLAGS) obj/*.${ObjSuffix}
# for debug	
rc:
	echo PROJ_OBJ=${PROJ_OBJ}

auto:
	.autoedit/autoedit.py
